package com.zhang.zxx.boot.entity.DO;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 部门表: 控制层接口管理
 *
 * @author zhangxiaoxiang
 * @date 2021-11-27
 */
@Data
// @SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_dept")
@ApiModel(value = "SysDept对象", description = "部门表")
public class SysDept implements Serializable {

    private static final long serialVersionUID = 1L;

     /**
      * 部门id
      */
    @ApiModelProperty("部门id")
    private String id;

     /**
      * 父部门id
      */
    @ApiModelProperty("父部门id")
    private String parentId;

     /**
      * 祖级列表
      */
    @ApiModelProperty("祖级列表")
    private String ancestors;

     /**
      * 部门名称
      */
    @ApiModelProperty("部门名称")
    private String name;

     /**
      * 显示顺序
      */
    @ApiModelProperty("显示顺序")
    private BigDecimal deptSort;

     /**
      * 联系电话
      */
    @ApiModelProperty("联系电话")
    private String phone;

     /**
      * 邮箱
      */
    @ApiModelProperty("邮箱")
    private String email;

     /**
      * 部门状态（0、正常；1、停用）
      */
    @ApiModelProperty("部门状态（0、正常；1、停用）")
    private String deptStatus;

    @TableField(exist = false)
    private List<SysDept> children;


    public static final String ID = "id";

    public static final String PARENT_ID = "parent_id";

    public static final String ANCESTORS = "ancestors";

    public static final String NAME = "name";

    public static final String DEPT_SORT = "dept_sort";

    public static final String PHONE = "phone";

    public static final String EMAIL = "email";

    public static final String DEPT_STATUS = "dept_status";


}
